<template>
  <div id="app">
    <router-view v-if="!appError"></router-view>
    <errorPage v-if="appError" />
  </div>
</template>
<script>
console.log('proces1s.env', process.env)
import errorPage from './views/error'

export default {
  name: 'app',

  components: {
    errorPage
  },

  computed: {
    appLoading() {
      return this.$store.state.app.appLoading
    },
    appError() {
      return this.$store.state.app.appError
    }
  },
  data() {
    return {}
  },

  mounted() {},
  watch: {
    $route() {
      // 监听 路由上 token 变化
      this.$store.commit('app/SETTOKENFROMURL')
    }
  }
}
</script>
<style lang="less">
@import '~@/styles/vars.less';
@import '~@/styles/public.less';
#app {
  height: 100%;
}
</style>
